﻿//===============================================================================
// Microsoft Innovation Centre - Western Europe
// Copyright (c) 2008 Microsoft Corporation. All rights reserved.
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===============================================================================
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================

using System.Globalization;
using System.Resources;
using System.Threading;

namespace Microsoft.WVB.Services
{
    internal sealed class Resx
    {
        private static Resx loader;
        private ResourceManager resources;
        private static object s_InternalSyncObject;

        internal const string WCF_Services_Exception_Unknown = "WCF_Services_Exception_Unknown";
        internal const string WCF_Services_Exception_NullReference = "WCF_Services_Exception_NullReference";
        internal const string WCF_Services_Exception_InternalServerError = "WCF_Services_Exception_InternalServerError";
        internal const string MICProfileProvider_Exception_Serialization = "MICProfileProvider_Exception_Serialization";
        internal const string MICMembershipProvider_Exception_Serialization = "MICMembershipProvider_Exception_Serialization";

       
        static Resx()
        {
            loader = null;
        }

        internal Resx()
        {
            this.resources = new ResourceManager("Microsoft.WVB.Services.Resources", base.GetType().Assembly);
        }

        private static CultureInfo Culture
        {
            get
            {
                return null;
            }
        }

        public static ResourceManager Resources
        {
            get
            {
                return GetLoader().resources;
            }
        }

        public static object GetObject(string name)
        {
            Resx loader = GetLoader();
            if (loader == null)
            {
                return null;
            }
            return loader.resources.GetObject(name, Culture);
        }

        public static string GetString(string name, params object[] args)
        {
            Resx loader = GetLoader();
            if (loader == null)
            {
                return null;
            }
            string format = loader.resources.GetString(name, Culture);
            if ((args == null) || (args.Length <= 0))
            {
                return format;
            }
            for (int i = 0; i < args.Length; i++)
            {
                string str2 = args[i] as string;
                if ((str2 != null) && (str2.Length > 0x400))
                {
                    args[i] = str2.Substring(0, 0x3fd) + "...";
                }
            }
            return string.Format(CultureInfo.CurrentCulture, format, args);
        } 

        public static string GetString(string name, out bool usedFallback)
        {
            usedFallback = false;
            return GetString(name);
        }

        public static string GetString(string name)
        {
            Resx loader = GetLoader();
            if (loader == null)
            {
                return null;
            }
            return loader.resources.GetString(name, Culture);
        }

        private static Resx GetLoader()
        {
            if (loader == null)
            {
                lock (InternalSyncObject)
                {
                    if (loader == null)
                    {
                        loader = new Resx();
                    }
                }
            }
            return loader;
        }

        private static object InternalSyncObject
        {
            get
            {
                if (s_InternalSyncObject == null)
                {
                    object obj2 = new object();
                    Interlocked.CompareExchange<object>(ref s_InternalSyncObject, obj2, null);
                }
                return s_InternalSyncObject;
            }
        }

    }

    internal sealed class Strings
    {
        internal static string WCF_Services_Exception_Unknown
        {
            get { return Resx.GetString(Resx.WCF_Services_Exception_Unknown); }
        }

        internal static string WCF_Services_Exception_NullReference
        {
            get { return Resx.GetString(Resx.WCF_Services_Exception_NullReference); }
        }     
   
        internal static string MICProfileProvider_Exception_Serialization
        {
            get { return Resx.GetString(Resx.MICProfileProvider_Exception_Serialization); }
        }

        internal static string WCF_Services_Exception_InternalServerError
        {
            get { return Resx.GetString(Resx.WCF_Services_Exception_InternalServerError); }
        }

        internal static string MICMembershipProvider_Exception_Serialization
        {
            get { return Resx.GetString(Resx.MICMembershipProvider_Exception_Serialization); }
        }
    }
}
